package com.demo1;

public class Context {


    Stratergy stratergy;
    //初始化传入具体的算法对象
    public Context(Stratergy stratergy) {
        this.stratergy = stratergy;
    }
    //有具体的算法对象调用相应算法
    public void ContextInterface(){
        stratergy.AlgorithmInterface();
    }
}
